Xbasic

a5queueing::queueCreateQueueItem Method

Syntax

.CreateQueueItem as A5Queueing::QueueItem ()

Returns

resultA5Queueing::QueueItem

New queue item.

Description

Return a new Queue Item for the Queue type.

Example

dim qm as A5Queueing::Queue = null_value()
dim item as A5Queueing::QueueItem = null_value()
' Calculate queue url from Account + Region
if A5Queueing::Queue::Open(qm,"Provider='RabbitMQ';Host='localhost';Queue='TestQ';").success then
    ' Create a new QUEUE item to send...
    item = qm.CreateQueueItem()
    ' Populate the QUEUE body
    item.Body = "Hello RabbitMQ"
    dim callresult as p = qm.Enqueue(item)
    if callresult.Error then
       ui_msg_box("Error",callresult.MessageToDisplay)
    end if
end if